package com.grace.law.bean;

import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;

public class CaseExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public CaseExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        protected void addCriterionForJDBCDate(String condition, Date value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value.getTime()), property);
        }

        protected void addCriterionForJDBCDate(String condition, List<Date> values, String property) {
            if (values == null || values.size() == 0) {
                throw new RuntimeException("Value list for " + property + " cannot be null or empty");
            }
            List<java.sql.Date> dateList = new ArrayList<java.sql.Date>();
            Iterator<Date> iter = values.iterator();
            while (iter.hasNext()) {
                dateList.add(new java.sql.Date(iter.next().getTime()));
            }
            addCriterion(condition, dateList, property);
        }

        protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property);
        }

        public Criteria andCustomerIdIsNull() {
            addCriterion("customer_id is null");
            return (Criteria) this;
        }

        public Criteria andCustomerIdIsNotNull() {
            addCriterion("customer_id is not null");
            return (Criteria) this;
        }

        public Criteria andCustomerIdEqualTo(Integer value) {
            addCriterion("customer_id =", value, "customerId");
            return (Criteria) this;
        }

        public Criteria andCustomerIdNotEqualTo(Integer value) {
            addCriterion("customer_id <>", value, "customerId");
            return (Criteria) this;
        }

        public Criteria andCustomerIdGreaterThan(Integer value) {
            addCriterion("customer_id >", value, "customerId");
            return (Criteria) this;
        }

        public Criteria andCustomerIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("customer_id >=", value, "customerId");
            return (Criteria) this;
        }

        public Criteria andCustomerIdLessThan(Integer value) {
            addCriterion("customer_id <", value, "customerId");
            return (Criteria) this;
        }

        public Criteria andCustomerIdLessThanOrEqualTo(Integer value) {
            addCriterion("customer_id <=", value, "customerId");
            return (Criteria) this;
        }

        public Criteria andCustomerIdIn(List<Integer> values) {
            addCriterion("customer_id in", values, "customerId");
            return (Criteria) this;
        }

        public Criteria andCustomerIdNotIn(List<Integer> values) {
            addCriterion("customer_id not in", values, "customerId");
            return (Criteria) this;
        }

        public Criteria andCustomerIdBetween(Integer value1, Integer value2) {
            addCriterion("customer_id between", value1, value2, "customerId");
            return (Criteria) this;
        }

        public Criteria andCustomerIdNotBetween(Integer value1, Integer value2) {
            addCriterion("customer_id not between", value1, value2, "customerId");
            return (Criteria) this;
        }

        public Criteria andCollectDateIsNull() {
            addCriterion("collect_date is null");
            return (Criteria) this;
        }

        public Criteria andCollectDateIsNotNull() {
            addCriterion("collect_date is not null");
            return (Criteria) this;
        }

        public Criteria andCollectDateEqualTo(Date value) {
            addCriterionForJDBCDate("collect_date =", value, "collectDate");
            return (Criteria) this;
        }

        public Criteria andCollectDateNotEqualTo(Date value) {
            addCriterionForJDBCDate("collect_date <>", value, "collectDate");
            return (Criteria) this;
        }

        public Criteria andCollectDateGreaterThan(Date value) {
            addCriterionForJDBCDate("collect_date >", value, "collectDate");
            return (Criteria) this;
        }

        public Criteria andCollectDateGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("collect_date >=", value, "collectDate");
            return (Criteria) this;
        }

        public Criteria andCollectDateLessThan(Date value) {
            addCriterionForJDBCDate("collect_date <", value, "collectDate");
            return (Criteria) this;
        }

        public Criteria andCollectDateLessThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("collect_date <=", value, "collectDate");
            return (Criteria) this;
        }

        public Criteria andCollectDateIn(List<Date> values) {
            addCriterionForJDBCDate("collect_date in", values, "collectDate");
            return (Criteria) this;
        }

        public Criteria andCollectDateNotIn(List<Date> values) {
            addCriterionForJDBCDate("collect_date not in", values, "collectDate");
            return (Criteria) this;
        }

        public Criteria andCollectDateBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("collect_date between", value1, value2, "collectDate");
            return (Criteria) this;
        }

        public Criteria andCollectDateNotBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("collect_date not between", value1, value2, "collectDate");
            return (Criteria) this;
        }

        public Criteria andCustomerNameIsNull() {
            addCriterion("customer_name is null");
            return (Criteria) this;
        }

        public Criteria andCustomerNameIsNotNull() {
            addCriterion("customer_name is not null");
            return (Criteria) this;
        }

        public Criteria andCustomerNameEqualTo(String value) {
            addCriterion("customer_name =", value, "customerName");
            return (Criteria) this;
        }

        public Criteria andCustomerNameNotEqualTo(String value) {
            addCriterion("customer_name <>", value, "customerName");
            return (Criteria) this;
        }

        public Criteria andCustomerNameGreaterThan(String value) {
            addCriterion("customer_name >", value, "customerName");
            return (Criteria) this;
        }

        public Criteria andCustomerNameGreaterThanOrEqualTo(String value) {
            addCriterion("customer_name >=", value, "customerName");
            return (Criteria) this;
        }

        public Criteria andCustomerNameLessThan(String value) {
            addCriterion("customer_name <", value, "customerName");
            return (Criteria) this;
        }

        public Criteria andCustomerNameLessThanOrEqualTo(String value) {
            addCriterion("customer_name <=", value, "customerName");
            return (Criteria) this;
        }

        public Criteria andCustomerNameLike(String value) {
            addCriterion("customer_name like", value, "customerName");
            return (Criteria) this;
        }

        public Criteria andCustomerNameNotLike(String value) {
            addCriterion("customer_name not like", value, "customerName");
            return (Criteria) this;
        }

        public Criteria andCustomerNameIn(List<String> values) {
            addCriterion("customer_name in", values, "customerName");
            return (Criteria) this;
        }

        public Criteria andCustomerNameNotIn(List<String> values) {
            addCriterion("customer_name not in", values, "customerName");
            return (Criteria) this;
        }

        public Criteria andCustomerNameBetween(String value1, String value2) {
            addCriterion("customer_name between", value1, value2, "customerName");
            return (Criteria) this;
        }

        public Criteria andCustomerNameNotBetween(String value1, String value2) {
            addCriterion("customer_name not between", value1, value2, "customerName");
            return (Criteria) this;
        }

        public Criteria andGenderIsNull() {
            addCriterion("gender is null");
            return (Criteria) this;
        }

        public Criteria andGenderIsNotNull() {
            addCriterion("gender is not null");
            return (Criteria) this;
        }

        public Criteria andGenderEqualTo(String value) {
            addCriterion("gender =", value, "gender");
            return (Criteria) this;
        }

        public Criteria andGenderNotEqualTo(String value) {
            addCriterion("gender <>", value, "gender");
            return (Criteria) this;
        }

        public Criteria andGenderGreaterThan(String value) {
            addCriterion("gender >", value, "gender");
            return (Criteria) this;
        }

        public Criteria andGenderGreaterThanOrEqualTo(String value) {
            addCriterion("gender >=", value, "gender");
            return (Criteria) this;
        }

        public Criteria andGenderLessThan(String value) {
            addCriterion("gender <", value, "gender");
            return (Criteria) this;
        }

        public Criteria andGenderLessThanOrEqualTo(String value) {
            addCriterion("gender <=", value, "gender");
            return (Criteria) this;
        }

        public Criteria andGenderLike(String value) {
            addCriterion("gender like", value, "gender");
            return (Criteria) this;
        }

        public Criteria andGenderNotLike(String value) {
            addCriterion("gender not like", value, "gender");
            return (Criteria) this;
        }

        public Criteria andGenderIn(List<String> values) {
            addCriterion("gender in", values, "gender");
            return (Criteria) this;
        }

        public Criteria andGenderNotIn(List<String> values) {
            addCriterion("gender not in", values, "gender");
            return (Criteria) this;
        }

        public Criteria andGenderBetween(String value1, String value2) {
            addCriterion("gender between", value1, value2, "gender");
            return (Criteria) this;
        }

        public Criteria andGenderNotBetween(String value1, String value2) {
            addCriterion("gender not between", value1, value2, "gender");
            return (Criteria) this;
        }

        public Criteria andPhoneIsNull() {
            addCriterion("phone is null");
            return (Criteria) this;
        }

        public Criteria andPhoneIsNotNull() {
            addCriterion("phone is not null");
            return (Criteria) this;
        }

        public Criteria andPhoneEqualTo(String value) {
            addCriterion("phone =", value, "phone");
            return (Criteria) this;
        }

        public Criteria andPhoneNotEqualTo(String value) {
            addCriterion("phone <>", value, "phone");
            return (Criteria) this;
        }

        public Criteria andPhoneGreaterThan(String value) {
            addCriterion("phone >", value, "phone");
            return (Criteria) this;
        }

        public Criteria andPhoneGreaterThanOrEqualTo(String value) {
            addCriterion("phone >=", value, "phone");
            return (Criteria) this;
        }

        public Criteria andPhoneLessThan(String value) {
            addCriterion("phone <", value, "phone");
            return (Criteria) this;
        }

        public Criteria andPhoneLessThanOrEqualTo(String value) {
            addCriterion("phone <=", value, "phone");
            return (Criteria) this;
        }

        public Criteria andPhoneLike(String value) {
            addCriterion("phone like", value, "phone");
            return (Criteria) this;
        }

        public Criteria andPhoneNotLike(String value) {
            addCriterion("phone not like", value, "phone");
            return (Criteria) this;
        }

        public Criteria andPhoneIn(List<String> values) {
            addCriterion("phone in", values, "phone");
            return (Criteria) this;
        }

        public Criteria andPhoneNotIn(List<String> values) {
            addCriterion("phone not in", values, "phone");
            return (Criteria) this;
        }

        public Criteria andPhoneBetween(String value1, String value2) {
            addCriterion("phone between", value1, value2, "phone");
            return (Criteria) this;
        }

        public Criteria andPhoneNotBetween(String value1, String value2) {
            addCriterion("phone not between", value1, value2, "phone");
            return (Criteria) this;
        }

        public Criteria andHospitalIsNull() {
            addCriterion("hospital is null");
            return (Criteria) this;
        }

        public Criteria andHospitalIsNotNull() {
            addCriterion("hospital is not null");
            return (Criteria) this;
        }

        public Criteria andHospitalEqualTo(String value) {
            addCriterion("hospital =", value, "hospital");
            return (Criteria) this;
        }

        public Criteria andHospitalNotEqualTo(String value) {
            addCriterion("hospital <>", value, "hospital");
            return (Criteria) this;
        }

        public Criteria andHospitalGreaterThan(String value) {
            addCriterion("hospital >", value, "hospital");
            return (Criteria) this;
        }

        public Criteria andHospitalGreaterThanOrEqualTo(String value) {
            addCriterion("hospital >=", value, "hospital");
            return (Criteria) this;
        }

        public Criteria andHospitalLessThan(String value) {
            addCriterion("hospital <", value, "hospital");
            return (Criteria) this;
        }

        public Criteria andHospitalLessThanOrEqualTo(String value) {
            addCriterion("hospital <=", value, "hospital");
            return (Criteria) this;
        }

        public Criteria andHospitalLike(String value) {
            addCriterion("hospital like", value, "hospital");
            return (Criteria) this;
        }

        public Criteria andHospitalNotLike(String value) {
            addCriterion("hospital not like", value, "hospital");
            return (Criteria) this;
        }

        public Criteria andHospitalIn(List<String> values) {
            addCriterion("hospital in", values, "hospital");
            return (Criteria) this;
        }

        public Criteria andHospitalNotIn(List<String> values) {
            addCriterion("hospital not in", values, "hospital");
            return (Criteria) this;
        }

        public Criteria andHospitalBetween(String value1, String value2) {
            addCriterion("hospital between", value1, value2, "hospital");
            return (Criteria) this;
        }

        public Criteria andHospitalNotBetween(String value1, String value2) {
            addCriterion("hospital not between", value1, value2, "hospital");
            return (Criteria) this;
        }

        public Criteria andAccidentTypeIsNull() {
            addCriterion("accident_type is null");
            return (Criteria) this;
        }

        public Criteria andAccidentTypeIsNotNull() {
            addCriterion("accident_type is not null");
            return (Criteria) this;
        }

        public Criteria andAccidentTypeEqualTo(String value) {
            addCriterion("accident_type =", value, "accidentType");
            return (Criteria) this;
        }

        public Criteria andAccidentTypeNotEqualTo(String value) {
            addCriterion("accident_type <>", value, "accidentType");
            return (Criteria) this;
        }

        public Criteria andAccidentTypeGreaterThan(String value) {
            addCriterion("accident_type >", value, "accidentType");
            return (Criteria) this;
        }

        public Criteria andAccidentTypeGreaterThanOrEqualTo(String value) {
            addCriterion("accident_type >=", value, "accidentType");
            return (Criteria) this;
        }

        public Criteria andAccidentTypeLessThan(String value) {
            addCriterion("accident_type <", value, "accidentType");
            return (Criteria) this;
        }

        public Criteria andAccidentTypeLessThanOrEqualTo(String value) {
            addCriterion("accident_type <=", value, "accidentType");
            return (Criteria) this;
        }

        public Criteria andAccidentTypeLike(String value) {
            addCriterion("accident_type like", value, "accidentType");
            return (Criteria) this;
        }

        public Criteria andAccidentTypeNotLike(String value) {
            addCriterion("accident_type not like", value, "accidentType");
            return (Criteria) this;
        }

        public Criteria andAccidentTypeIn(List<String> values) {
            addCriterion("accident_type in", values, "accidentType");
            return (Criteria) this;
        }

        public Criteria andAccidentTypeNotIn(List<String> values) {
            addCriterion("accident_type not in", values, "accidentType");
            return (Criteria) this;
        }

        public Criteria andAccidentTypeBetween(String value1, String value2) {
            addCriterion("accident_type between", value1, value2, "accidentType");
            return (Criteria) this;
        }

        public Criteria andAccidentTypeNotBetween(String value1, String value2) {
            addCriterion("accident_type not between", value1, value2, "accidentType");
            return (Criteria) this;
        }

        public Criteria andHasContractIsNull() {
            addCriterion("has_contract is null");
            return (Criteria) this;
        }

        public Criteria andHasContractIsNotNull() {
            addCriterion("has_contract is not null");
            return (Criteria) this;
        }

        public Criteria andHasContractEqualTo(String value) {
            addCriterion("has_contract =", value, "hasContract");
            return (Criteria) this;
        }

        public Criteria andHasContractNotEqualTo(String value) {
            addCriterion("has_contract <>", value, "hasContract");
            return (Criteria) this;
        }

        public Criteria andHasContractGreaterThan(String value) {
            addCriterion("has_contract >", value, "hasContract");
            return (Criteria) this;
        }

        public Criteria andHasContractGreaterThanOrEqualTo(String value) {
            addCriterion("has_contract >=", value, "hasContract");
            return (Criteria) this;
        }

        public Criteria andHasContractLessThan(String value) {
            addCriterion("has_contract <", value, "hasContract");
            return (Criteria) this;
        }

        public Criteria andHasContractLessThanOrEqualTo(String value) {
            addCriterion("has_contract <=", value, "hasContract");
            return (Criteria) this;
        }

        public Criteria andHasContractLike(String value) {
            addCriterion("has_contract like", value, "hasContract");
            return (Criteria) this;
        }

        public Criteria andHasContractNotLike(String value) {
            addCriterion("has_contract not like", value, "hasContract");
            return (Criteria) this;
        }

        public Criteria andHasContractIn(List<String> values) {
            addCriterion("has_contract in", values, "hasContract");
            return (Criteria) this;
        }

        public Criteria andHasContractNotIn(List<String> values) {
            addCriterion("has_contract not in", values, "hasContract");
            return (Criteria) this;
        }

        public Criteria andHasContractBetween(String value1, String value2) {
            addCriterion("has_contract between", value1, value2, "hasContract");
            return (Criteria) this;
        }

        public Criteria andHasContractNotBetween(String value1, String value2) {
            addCriterion("has_contract not between", value1, value2, "hasContract");
            return (Criteria) this;
        }

        public Criteria andHasInsuranceIsNull() {
            addCriterion("has_insurance is null");
            return (Criteria) this;
        }

        public Criteria andHasInsuranceIsNotNull() {
            addCriterion("has_insurance is not null");
            return (Criteria) this;
        }

        public Criteria andHasInsuranceEqualTo(String value) {
            addCriterion("has_insurance =", value, "hasInsurance");
            return (Criteria) this;
        }

        public Criteria andHasInsuranceNotEqualTo(String value) {
            addCriterion("has_insurance <>", value, "hasInsurance");
            return (Criteria) this;
        }

        public Criteria andHasInsuranceGreaterThan(String value) {
            addCriterion("has_insurance >", value, "hasInsurance");
            return (Criteria) this;
        }

        public Criteria andHasInsuranceGreaterThanOrEqualTo(String value) {
            addCriterion("has_insurance >=", value, "hasInsurance");
            return (Criteria) this;
        }

        public Criteria andHasInsuranceLessThan(String value) {
            addCriterion("has_insurance <", value, "hasInsurance");
            return (Criteria) this;
        }

        public Criteria andHasInsuranceLessThanOrEqualTo(String value) {
            addCriterion("has_insurance <=", value, "hasInsurance");
            return (Criteria) this;
        }

        public Criteria andHasInsuranceLike(String value) {
            addCriterion("has_insurance like", value, "hasInsurance");
            return (Criteria) this;
        }

        public Criteria andHasInsuranceNotLike(String value) {
            addCriterion("has_insurance not like", value, "hasInsurance");
            return (Criteria) this;
        }

        public Criteria andHasInsuranceIn(List<String> values) {
            addCriterion("has_insurance in", values, "hasInsurance");
            return (Criteria) this;
        }

        public Criteria andHasInsuranceNotIn(List<String> values) {
            addCriterion("has_insurance not in", values, "hasInsurance");
            return (Criteria) this;
        }

        public Criteria andHasInsuranceBetween(String value1, String value2) {
            addCriterion("has_insurance between", value1, value2, "hasInsurance");
            return (Criteria) this;
        }

        public Criteria andHasInsuranceNotBetween(String value1, String value2) {
            addCriterion("has_insurance not between", value1, value2, "hasInsurance");
            return (Criteria) this;
        }

        public Criteria andWageTypeIsNull() {
            addCriterion("wage_type is null");
            return (Criteria) this;
        }

        public Criteria andWageTypeIsNotNull() {
            addCriterion("wage_type is not null");
            return (Criteria) this;
        }

        public Criteria andWageTypeEqualTo(String value) {
            addCriterion("wage_type =", value, "wageType");
            return (Criteria) this;
        }

        public Criteria andWageTypeNotEqualTo(String value) {
            addCriterion("wage_type <>", value, "wageType");
            return (Criteria) this;
        }

        public Criteria andWageTypeGreaterThan(String value) {
            addCriterion("wage_type >", value, "wageType");
            return (Criteria) this;
        }

        public Criteria andWageTypeGreaterThanOrEqualTo(String value) {
            addCriterion("wage_type >=", value, "wageType");
            return (Criteria) this;
        }

        public Criteria andWageTypeLessThan(String value) {
            addCriterion("wage_type <", value, "wageType");
            return (Criteria) this;
        }

        public Criteria andWageTypeLessThanOrEqualTo(String value) {
            addCriterion("wage_type <=", value, "wageType");
            return (Criteria) this;
        }

        public Criteria andWageTypeLike(String value) {
            addCriterion("wage_type like", value, "wageType");
            return (Criteria) this;
        }

        public Criteria andWageTypeNotLike(String value) {
            addCriterion("wage_type not like", value, "wageType");
            return (Criteria) this;
        }

        public Criteria andWageTypeIn(List<String> values) {
            addCriterion("wage_type in", values, "wageType");
            return (Criteria) this;
        }

        public Criteria andWageTypeNotIn(List<String> values) {
            addCriterion("wage_type not in", values, "wageType");
            return (Criteria) this;
        }

        public Criteria andWageTypeBetween(String value1, String value2) {
            addCriterion("wage_type between", value1, value2, "wageType");
            return (Criteria) this;
        }

        public Criteria andWageTypeNotBetween(String value1, String value2) {
            addCriterion("wage_type not between", value1, value2, "wageType");
            return (Criteria) this;
        }

        public Criteria andInHospitalDateIsNull() {
            addCriterion("in_hospital_date is null");
            return (Criteria) this;
        }

        public Criteria andInHospitalDateIsNotNull() {
            addCriterion("in_hospital_date is not null");
            return (Criteria) this;
        }

        public Criteria andInHospitalDateEqualTo(Date value) {
            addCriterionForJDBCDate("in_hospital_date =", value, "inHospitalDate");
            return (Criteria) this;
        }

        public Criteria andInHospitalDateNotEqualTo(Date value) {
            addCriterionForJDBCDate("in_hospital_date <>", value, "inHospitalDate");
            return (Criteria) this;
        }

        public Criteria andInHospitalDateGreaterThan(Date value) {
            addCriterionForJDBCDate("in_hospital_date >", value, "inHospitalDate");
            return (Criteria) this;
        }

        public Criteria andInHospitalDateGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("in_hospital_date >=", value, "inHospitalDate");
            return (Criteria) this;
        }

        public Criteria andInHospitalDateLessThan(Date value) {
            addCriterionForJDBCDate("in_hospital_date <", value, "inHospitalDate");
            return (Criteria) this;
        }

        public Criteria andInHospitalDateLessThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("in_hospital_date <=", value, "inHospitalDate");
            return (Criteria) this;
        }

        public Criteria andInHospitalDateIn(List<Date> values) {
            addCriterionForJDBCDate("in_hospital_date in", values, "inHospitalDate");
            return (Criteria) this;
        }

        public Criteria andInHospitalDateNotIn(List<Date> values) {
            addCriterionForJDBCDate("in_hospital_date not in", values, "inHospitalDate");
            return (Criteria) this;
        }

        public Criteria andInHospitalDateBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("in_hospital_date between", value1, value2, "inHospitalDate");
            return (Criteria) this;
        }

        public Criteria andInHospitalDateNotBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("in_hospital_date not between", value1, value2, "inHospitalDate");
            return (Criteria) this;
        }

        public Criteria andLeaveHospitalDateIsNull() {
            addCriterion("leave_hospital_date is null");
            return (Criteria) this;
        }

        public Criteria andLeaveHospitalDateIsNotNull() {
            addCriterion("leave_hospital_date is not null");
            return (Criteria) this;
        }

        public Criteria andLeaveHospitalDateEqualTo(Date value) {
            addCriterionForJDBCDate("leave_hospital_date =", value, "leaveHospitalDate");
            return (Criteria) this;
        }

        public Criteria andLeaveHospitalDateNotEqualTo(Date value) {
            addCriterionForJDBCDate("leave_hospital_date <>", value, "leaveHospitalDate");
            return (Criteria) this;
        }

        public Criteria andLeaveHospitalDateGreaterThan(Date value) {
            addCriterionForJDBCDate("leave_hospital_date >", value, "leaveHospitalDate");
            return (Criteria) this;
        }

        public Criteria andLeaveHospitalDateGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("leave_hospital_date >=", value, "leaveHospitalDate");
            return (Criteria) this;
        }

        public Criteria andLeaveHospitalDateLessThan(Date value) {
            addCriterionForJDBCDate("leave_hospital_date <", value, "leaveHospitalDate");
            return (Criteria) this;
        }

        public Criteria andLeaveHospitalDateLessThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("leave_hospital_date <=", value, "leaveHospitalDate");
            return (Criteria) this;
        }

        public Criteria andLeaveHospitalDateIn(List<Date> values) {
            addCriterionForJDBCDate("leave_hospital_date in", values, "leaveHospitalDate");
            return (Criteria) this;
        }

        public Criteria andLeaveHospitalDateNotIn(List<Date> values) {
            addCriterionForJDBCDate("leave_hospital_date not in", values, "leaveHospitalDate");
            return (Criteria) this;
        }

        public Criteria andLeaveHospitalDateBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("leave_hospital_date between", value1, value2, "leaveHospitalDate");
            return (Criteria) this;
        }

        public Criteria andLeaveHospitalDateNotBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("leave_hospital_date not between", value1, value2, "leaveHospitalDate");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}